package cc.linker.steplink.crm.commons.form;

import java.util.HashMap;
import java.util.Map;

/**
 * @Author: CKQ
 * @DateTime: 2020/8/18 10:52
 * @Description: TODO
 */
public class ActiveConfig {

    //定义所有的方法体
    private static final Map<String, InterfaceInfo> formActiveList;
    static
    {
        formActiveList = new HashMap<String, InterfaceInfo>();
        formActiveList.put("/h5/form/getCustomerRecord", InterfaceInfo.builder().method("/h5/form/getCustomerRecord").mode("get").build());
        formActiveList.put("/h5/form/applyForm", InterfaceInfo.builder().method("/h5/form/applyForm").mode("post").build());
        formActiveList.put("/h5/form/getRecordByOrderSn", InterfaceInfo.builder().method("/h5/form/getRecordByOrderSn").mode("get").build());
        formActiveList.put("/h5/form/log/add", InterfaceInfo.builder().method("/h5/form/log/add").mode("post").build());
        formActiveList.put("/h5/form/updateCustomerRecord",  InterfaceInfo.builder().method("/h5/form/updateCustomerRecord").mode("put").build());
        formActiveList.put("/form/getSign",  InterfaceInfo.builder().method("/form/getSign").mode("get").build());
        formActiveList.put("/h5/form/getCustomerInfo",  InterfaceInfo.builder().method("/h5/form/getCustomerInfo").mode("get").build());
        formActiveList.put("/h5/form/getFormInfo",  InterfaceInfo.builder().method("/h5/form/getFormInfo").mode("get").build());
        formActiveList.put("/pc/form/templates/setFormTemplatesAlliance",  InterfaceInfo.builder().method("/pc/form/templates/setFormTemplatesAlliance").mode("post").build());
        formActiveList.put("/pc/form/templates/setFormTemplatesRebate",  InterfaceInfo.builder().method("/pc/form/templates/setFormTemplatesRebate").mode("post").build());
        formActiveList.put("/pc/form/templates/updateForm",  InterfaceInfo.builder().method("/pc/form/templates/updateForm").mode("post").build());
        formActiveList.put("/pc/form/formRecordText/findTotalData", InterfaceInfo.builder().method("/pc/form/formRecordText/findTotalData").mode("get").build());
        formActiveList.put("/pc/form/formRecordFilelist/findTotalData", InterfaceInfo.builder().method("/pc/form/formRecordFilelist/findTotalData").mode("get").build());
        formActiveList.put("/pc/form/templates/banned", InterfaceInfo.builder().method("/pc/form/templates/banned").mode("post").build());
        formActiveList.put("/pc/form/templates/changeFormTemplatesStatus", InterfaceInfo.builder().method("/pc/form/templates/changeFormTemplatesStatus").mode("put").build());
        formActiveList.put("/form/file/img/load", InterfaceInfo.builder().method("/form/file/img/load").mode("get").build());
        formActiveList.put("/pc/form/templates/addForm", InterfaceInfo.builder().method("/pc/form/templates/addForm").mode("post").build());
        formActiveList.put("/pc/form/templates/getMyEnroll", InterfaceInfo.builder().method("/pc/form/templates/getMyEnroll").mode("get").build());
        formActiveList.put("/pc/form/record/recordlist", InterfaceInfo.builder().method("/pc/form/record/recordlist").mode("get").build());
        formActiveList.put("/pc/form/record/recordAlllist", InterfaceInfo.builder().method("/pc/form/record/recordAlllist").mode("get").build());
        formActiveList.put("/pc/form/templates/getShareList", InterfaceInfo.builder().method("/pc/form/templates/getShareList").mode("get").build());
        formActiveList.put("/pc/form/templates/getList", InterfaceInfo.builder().method("/pc/form/templates/getList").mode("get").build());
        formActiveList.put("/pc/form/templates/getAllList", InterfaceInfo.builder().method("/pc/form/templates/getAllList").mode("get").build());
        formActiveList.put("/pc/form/templates/getFormStatus", InterfaceInfo.builder().method("/pc/form/templates/getFormStatus").mode("get").build());
        formActiveList.put("/pc/form/templates/getByFormId", InterfaceInfo.builder().method("/pc/form/templates/getByFormId").mode("get").build());
        formActiveList.put("/pc/form/attributeItem/getItemByFormId", InterfaceInfo.builder().method("/pc/form/attributeItem/getItemByFormId").mode("get").build());
        formActiveList.put("/pc/form/attribute/getAttributeTotalData", InterfaceInfo.builder().method("/pc/form/attribute/getAttributeTotalData").mode("get").build());
        formActiveList.put("/pc/form/data/getFormDataSummaryDateList", InterfaceInfo.builder().method("/pc/form/data/getFormDataSummaryDateList").mode("get").build());
        formActiveList.put("/pc/form/data/getFormDataSummaryList", InterfaceInfo.builder().method("/pc/form/data/getFormDataSummaryList").mode("get").build());
        formActiveList.put("/pc/form/data/getFormDataSummaryDetail", InterfaceInfo.builder().method("/pc/form/data/getFormDataSummaryDetail").mode("get").build());
        formActiveList.put("/pc/form/templates/allianceShareList", InterfaceInfo.builder().method("/pc/form/templates/allianceShareList").mode("get").build());
        formActiveList.put("/pc/form/templates/saveSharing", InterfaceInfo.builder().method("/pc/form/templates/saveSharing").mode("post").build());

    }

    //获取方法名称
    public static InterfaceInfo getInterfaceInfo(String active){
        for(String key : formActiveList.keySet()){
            if(key.equals(active)) {
                return formActiveList.get(key);
            }
        }
        return null;
    }



}
